package org.wendu.wdoa.common;

public enum TrStatusEnum {
    TR_STATUS_NOT_SUBMIT(0,"预下达"),
    TR_STATUS_SUBMITED(1,"已下达"),
    TR_STATUS_RECEIVED(2,"已接收"),
    TR_STATUS_HUIBAO(3,"已汇报"),
    TR_STATUS_NOT_PASS(4,"验收未通过"),
    TR_STATUS_PASS(5,"验收通过");


    private Integer code;
    private String name;

    private TrStatusEnum(Integer code,String name){
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }



    public static String getNameByCode(Integer code){

        TrStatusEnum[] values = TrStatusEnum.values();
        for(TrStatusEnum trStatusEnum : values){
            if(trStatusEnum.code.equals(code)){
                return trStatusEnum.name;
            }
        }

        return null;
    }
}
